/*
 * @lc app=leetcode.cn id=2062 lang=typescript
 *
 * [2062] 统计字符串中的元音子字符串
 */

// @lc code=start
function countVowelSubstrings(word: string): number {
    const temp = "aeiou";
    const is = (i: string) => {
        const set = new Set(i);
        return set.size === 5 && temp.split("").every((i) => set.has(i));
    };
    let count = 0;
    for (let i = 0; i < word.length; i++) {
        for (let j = i + 5; j < word.length + 1; j++) {
            const item = word.slice(i, j);
            if (is(item)) count++;
        }
    }
    return count;
}
// @lc code=end
